package cn.wusifx.zabbix.request.builder.image;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.CreateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/image/create
 */
public class ImageCreateRequestBuilder extends CreateRequestBuilder {
    private String name;
    private String image;
    private Integer imageType;
    public ImageCreateRequestBuilder(String auth) {
        super("image.create", auth);
    }

    public ImageCreateRequestBuilder(Long id, String auth) {
        super("image.create", id, auth);
    }

    public String getName() {
        return name;
    }

    public ImageCreateRequestBuilder setName(String name) {
        this.name = name;
        return this;
    }

    public String getImage() {
        return image;
    }

    public ImageCreateRequestBuilder setImage(String image) {
        this.image = image;
        return this;
    }

    public Integer getImageType() {
        return imageType;
    }

    public ImageCreateRequestBuilder setImageType(Integer imageType) {
        this.imageType = imageType;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("name",name);
        baseRequest.getParams().put("image",image);
        baseRequest.getParams().put("imagetype",imageType);
        return baseRequest;
    }
}
